﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace SuperSurvey.DAO
{
    public class LoginDAO
    {
        private DatabaseInteraction cnn;
       
        public DataTable Login(string usename)
        {
            cnn = new DatabaseInteraction();
            string QuerySql = "SELECT Username,[Password] FROM UserLogin WHERE Username = @usename";
            SqlParameter[] myparameter = new SqlParameter[1];
            myparameter[0] = new SqlParameter("@usename", SqlDbType.NVarChar, 100);
            myparameter[0].Value = usename;
            return cnn.excuteSelectQuery(QuerySql, myparameter);
        }
    }
}